package com.big.app.controller;


import com.big.app.bo.PayBo;
import com.big.app.service.intf.HotelService;
import com.big.app.vo1.R;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 *  (Sight)表控制层
 *
 * @author makejava
 * @since 2022-04-19 15:23:35
 */
@RestController
@RequestMapping("/api/hotel/")
@Api(value = "实现酒店的相关操作",tags="实现酒店的相关操作")
@CrossOrigin //跨域
public class HotelController {

    @Resource
    private HotelService service;
    @GetMapping("queryHotTop.do")
    public R queryHotTop(){
        return service.queryHotTop();
    }
    @GetMapping("search.do")
    public R search(String title){
        return service.search(title);
    }
    @GetMapping("detail.do")
    public R detail(int id){
        return service.detail(id);
    }
    @GetMapping("comment.do")
    public R comment(int id, int uid){
        return service.comment(id,uid);
    }
    @PostMapping("order.do")
    public R createPay(@RequestBody PayBo bo){
        return service.order(bo);
    }
//    @GetMapping("map.do")
//    public R map(String name){
//        return service.map(name);
//    }
}

